<script  type="text/javascript">
<{include file='order/assign/js/index.js'}>
</script>
<link href="/css/order/order.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
    .myTab table td{ border:0;text-align:left;}
    .shiptype .sel{color:red;}
    .hidden{display:none;}
    
</style>
<div id="right_confirm" style="display: none;"  title="<{$lang.order}>分配<{$lang.pickup_user}>">
	<p style="text-align:left;font-size: 14px;color: blue;font-weight: bold;">
	<{$lang.ok}>要将该单进行分配吗？
	</p>
	<form id="assignForm" name="assignForm">
	    <input type="hidden" id="order_code" name="order_code" />
	    <label>
			<{$lang.pls}><{$lang.pickup_user}>:<select id="pickusers" name="pickusers">
				<option value=""><{$lang.pls}></option>
				<{foreach key=key item=item from=$pickusers}>
				<option value="<{$item.user_id}>"><{$item.name}></option>
				<{/foreach}>
			</select>
		</label>&nbsp;
	</form>
</div>

<div id="right_confirm_batch" style="display: none;"  title="<{$lang.order}><{$lang.batch}>分配<{$lang.pickup_user}>">
	<p style="text-align:left;font-size: 14px;color: blue;font-weight: bold;">
	<{$lang.ok}>要将所选的<{$lang.order}>进行<{$lang.batch}>分配吗？
	</p>
	<form id="assignBatchForm" name="assignBatchForm">
	   <div id="assignOrders"></div>
	    <label>
			<{$lang.pls}><{$lang.pickup_user}>:<select id="batchpickusers" name="batchpickusers">
				<option value=""><{$lang.pls}></option>
				<{foreach key=key item=item from=$pickusers}>
				<option value="<{$item.user_id}>"><{$item.name}></option>
				<{/foreach}>
			</select>
		</label>&nbsp;
	</form>
</div>


<div id="alert_msg" style="display: none;" title="<{$lang.tip}><{$lang.msg}>">
	<p style="font-size: 14px;">
	
	</p>
</div>
<div class="search_div">
    
    <form id="sForm" name="sForm">
	    <div id="iTitle">
	        <div style="padding:0;margin-bottom:8px;">
	            <input type="button" id="Create_Order" onclick="addOrder();" value="<{$lang.create}><{$lang.order}>" class="button hidden"/>
	            <input type="button" id="SwichBrowseType" onclick="swichBrowseType(this);" value="<{$lang.folder}><{$lang.product}>" class="button"/>
	        </div>
	    </div>
		<div>
			
		<select name="searchType" id='searchType' onchange="search();">
		    <option value="pickup_code"><{$lang.op_code}></option>
			<option value="orders_code"><{$lang.orders_code}></option>
			<option value="ship_code"><{$lang.trackNo}></option>
			<option value="ref_code"><{$lang.referNo}></option>
		</select>			
		<input type="text" id="code" name="code" class="myInput" />
		<input type="hidden" name="shipping_method" id="shipping_method_sch" />&nbsp;
		
		<label>
			<{$lang.customer_code}>:<input type="text" id="customerId" name="customerId" class="myInput" />
		</label>&nbsp;
		<label>
			<{$lang.status}>:<select name="orders_status_sch" onchange="search();">
				<option value=""><{$lang.pls}></option>
				<{foreach key=key item=item from=$processStatus}>
				<option value="<{$key}>"><{$item}></option>
				<{/foreach}>
			</select>
		</label>&nbsp;
		<input class="button" type="button" value="<{$lang.search}>" onclick="search();">&nbsp;&nbsp;
		<input class="button" type="button" value="<{$lang.batch}>分配" onclick="batchassign();">&nbsp;&nbsp;
		</div>

		<!--<div class="shiptype">
		<{$lang.shipping_method}><{$lang.select}>：<a href="javascript:;" onclick="shiptype_search('',this)" class='sel'><{$lang.all}></a>&nbsp;
		<{section name=st_name loop=$shipTypeArr}>
			<a href="javascript:;" onclick="shiptype_search('<{$shipTypeArr[st_name].st_name}>',this);" class=''><{$shipTypeArr[st_name].st_name}></a>
			&nbsp;
			<{if $smarty.section.st_name.index eq 6}> <br /> <{/if}>
		<{/section}>
		</div>
        -->
        
        <div class="shiptype">
		<{$lang.shipping_method}><{$lang.select}>：
        <select onchange="shiptype_search(this.value,this)" >
         <option value=""><{$lang.all}></option>
		<{foreach from=$shipType item=obj key=key name=obj}>
        	<option value="<{$obj.st_code}>"><{$obj.st_code}></option>			
		<{/foreach}>
        </select>
		</div>
	</form>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="myTab">
    <tbody>
    <tr class="even-tr">
        <th><input type="checkbox" value="0" name="ckAll" id="ckAll"/></th>
        <th><{$lang.No}></th>
        <th><{$lang.orders_code}></th>
        <th><{$lang.referNo}></th>
        <th><{$lang.user}></th>
        <th><{$lang.country}></th>
        <th><{$lang.shipping_method}></th>
        <th><{$lang.create}><{$lang.date}></th>
        <th><{$lang.print}><{$lang.date}></th>
        <th><{$lang.print}><{$lang.sort}></th>
        <th><{$lang.pickup_user}></th>
        <th><{$lang.status}></th>
        <th><{$lang.operation}></th>
    </tr>
    </tbody>
    <tbody id="loadData"></tbody>
</table>
<div class="pagination"></div>

<!--begin create_orders -->
<div id="order_form" title="录入<{$lang.order}>" style="display: none;">
    <form id="orderForm" name="orderForm">
        <div class="orderFormLine">
            <{$lang.operation}>步骤：<{$lang.order}>基本资料&nbsp;&nbsp;==&gt;&nbsp;&nbsp;<{$lang.add}><{$lang.product}>&nbsp;&nbsp;==&gt;&nbsp;&nbsp;<{$lang.customer}>资料&nbsp;&nbsp;==&gt;&nbsp;&nbsp;<{$lang.submit}><{$lang.order}>&nbsp;&nbsp;==&gt;&nbsp;&nbsp;<{$lang.finish}>
        </div>
        <div class="orderError"></div>
        <div id="base">
            <div class="orderFormTitle">
                <div class="orderFormTip"><span style=" font-weight:bold"><{$lang.order}>基本资料</span></div>
                <div style="clear: both;"></div>
            </div>
            <div class="orderFormBody">
                <div class="orderForm">
                    <div class="orderFormItem" style="width:65%">
                        <span class="orderFormLeft"><{$lang.customer_code}>:</span>
                        <span class="orderFormRight">
                             <input type="text" name="customer_id" id="customer_id" class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem" style="width:33%">
                        <span class="orderFormLeft" style="width:30%;text-align:left;">
                            <input type="button" class="myButton" value="下一步" onclick="changeStep('customer');"></span>

                        <div style="clear: both;"></div>
                    </div>
                    <div style="clear: both;"></div>
                </div>
            </div>
        </div>

        <div id="customer" style="display:none;">
            <div class="orderFormTitle">
                <div class="orderFormTip">收件人</div>
                <input type="button" onclick="changeStep('addProduct');" value="下一步" class="myButton"/>
                <input type="button" onclick="changeStep('base')" value="上一步" class="myButton"/>
            </div>
            <div class="orderFormBody">
                <div class="orderForm">
                    <div class="orderFormItem">
                        <span class="orderFormLeft"><{$lang.first_name}> 名:</span>

                        <span class="orderFormRight">
                            <input type="text" name="consignee_first_name" id="consignee_first_name"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft"><{$lang.last_name}> 姓:</span>
                        <span class="orderFormRight">
                            <input type="text" name="consignee_last_name" id="consignee_last_name"
                                   class="text ui-widget-content"/>
                        </span>
                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft"><{$lang.referNo}>:</span>
                        <span class="orderFormRight">
                            <input type="text" name="customer_order_code" id="customer_order_code"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft">Company <{$lang.company}>:</span>
                        <span class="orderFormRight">
                            <input type="text" name="consignee_company" id="consignee_company"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem" style="width:100%;">
                        <span class="orderFormLeft" style="width:20%;">Street1 地址1:</span>
                        <span class="orderFormRight" style="width:80%;">
                            <input type="text" name="consignee_address1" id="consignee_address1"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem" style="width:100%;">
                        <span class="orderFormLeft" style="width:20%;">Street2 地址2:</span>
                        <span class="orderFormRight" style="width:80%;">
                            <input type="text" name="consignee_address2" id="consignee_address2"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft">Country <{$lang.country}>:</span>
                        <span class="orderFormRight" id="country_id">
                            <select name="consignee_country_id" id="consignee_country_id" style="margin-left:8px;">
                                <option value=""><{$lang.pls}></option>
                            </select>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft">州/<{$lang.zone}>:</span>
                        <span class="orderFormRight">
                            <input type="text" name="consignee_region" id="consignee_region"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft"><{$lang.shipping_method}>:</span>
                        <span class="orderFormRight" id="shipping">
                            <select name="shipping_method" id="shipping_method" style="margin-left:8px;">
                                <option value=""><{$lang.pls}></option>
                            </select>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div style="clear: both;"></div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft">City 城市:</span>
                        <span class="orderFormRight">
                            <input type="text" name="consignee_city" id="consignee_city"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft">Zip 邮政编码:</span>
                        <span class="orderFormRight">
                            <input type="text" name="consignee_zip" id="consignee_zip" class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft">Phone <{$lang.telphone}>:</span>
                        <span class="orderFormRight">
                            <input type="text" name="consignee_phone" id="consignee_phone"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                    <div class="orderFormItem">
                        <span class="orderFormLeft"><{$lang.email}> 邮件:</span>
                        <span class="orderFormRight">
                            <input type="text" name="consignee_email" id="consignee_email"
                                   class="text ui-widget-content"/>
                        </span>

                        <div style="clear: both;"></div>
                    </div>
                </div>
            </div>
        </div>

        <div id="addProduct" style="display:none;">
            <div class="orderFormTitle">
                <div class="orderFormTip"><{$lang.add}><{$lang.product}></div>
                <input type="button" onclick="changeStep('customer');" value="上一步" class="myButton"/>
            </div>
            <div class="productTable">
                <div class="productHead">
                    <div class="apColumn1"><{$lang.picture}></div>
                    <div class="apColumn2">ID</div>
                    <div class="apColumn3"><{$lang.name}></div>
                    <div class="apColumn5"><{$lang.quantity}></div>
                    <div class="apColumn6"><{$lang.operation}></div>
                </div>
                <div class="myClear"></div>
                <div id="pProductData"></div>
            </div>
            <div class="orderFormLine" style="float:right;padding-right:20px;">
                <input type="button" onclick="addProduct('add')" value="<{$lang.pls}><{$lang.product}>..." class="myButton"/>
            </div>

            <div class="orderFormItem" style="width:100%;">
                <span class="orderFormLeft" style="width:20%;">物品<{$lang.description}>:</span>
                        <span class="orderFormRight" style="width:80%;">
                            <input type="text" name="parcel_contents" id="parcel_contents"
                                   class="text ui-widget-content"/>
                        </span>

                <div style="clear: both;"></div>
            </div>
            <div class="orderFormItem">
                <span class="orderFormLeft">物品<{$lang.quantity}>:</span>
                        <span class="orderFormRight">
                            <input type="text" name="parcel_quantity" id="parcel_quantity"
                                   class="text ui-widget-content"/>
                        </span>

                <div style="clear: both;"></div>
            </div>
            <div class="orderFormItem">
                <span class="orderFormLeft"><{$lang.declar_price}>:</span>
                        <span class="orderFormRight">
                            <input type="text" name="parcel_declared_value" id="parcel_declared_value"
                                   class="text ui-widget-content"/>
                        </span>

                <div style="clear: both;"></div>
            </div>
        </div>

    </form>
</div>
<!--end create_orders -->